package com.gm.wholesale.module.order.adapter

import android.os.Parcelable
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentStatePagerAdapter
import com.gm.commonlib.base.baseBean.BaseFragmentInfo
import com.youth.banner.util.LogUtils

class ViewPagerAdapter(fm: FragmentManager?, private val mFragments: List<BaseFragmentInfo>) :
    FragmentStatePagerAdapter(
        fm!!
    ) {
    override fun saveState(): Parcelable? {
        return null
    }

    override fun getItem(position: Int): Fragment {
        return mFragments[position].fragment
    }

    override fun getCount(): Int {
        return mFragments.size
    }

    override fun getPageTitle(position: Int): CharSequence? {
        return mFragments[position].title
    }
}